package com.wcll.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.wcll.bean.CQM_JianLi;

public class CQM_ZhiYeServlet extends HttpServlet {


	public CQM_ZhiYeServlet() {
		super();
	}

	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
		// Put your code here
	}


	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		CQM_JianLi jianli=new CQM_JianLi();
		response.setContentType("text/html; charset=UTF-8");
		request.setCharacterEncoding("UTF-8");
		 try {
			  List li=jianli.zhiYe();
			  request.setAttribute("li", li);
			  this.getServletContext().getRequestDispatcher("/cqm_zhiYe.jsp")
				.forward(request, response);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	       
	}
	

	public void init() throws ServletException {
		// Put your code here
	}

}
